import '@feidao/web/atom/nodejs/interfaces';
import html from './html';
import s from './ns';

declare const feidao_exports: any;

// drools + dask
import init from '@feidao/web/framework/nodejs/d/page';

////////////////////////////////////////////////////////////////////////////////
// import actions
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
// import components
import zj_teacher_001 from '../zj-teacher-001/n';
import zj_teacher_002 from '../zj-teacher-002/n';
// import zj_teacher_002 from './zj-teacher-002';
// import zj_teacher_003 from './zj-teacher-003';
////////////////////////////////////////////////////////////////////////////////

feidao_exports.default = async (url: string) => {
	const daoke = {};

	await init(html, url, s, daoke, zj_teacher_001, zj_teacher_002);
	return `
	<!DOCTYPE html>
	<html>
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<title>Main Page</title>
		<link href="https://unpkg.com/feidao-css/feidao.css" type="text/css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="./css/iconfont.css">
		<link rel="stylesheet" type="text/css" href="./css/daokes.css">
		<script src="./js/feidao.js"></script>
		<script type="text/javascript">
			window.addEventListener('WebComponentsReady', function () {
				var t = document.createElement('script');
				t.src = './js/@page.js';
				document.head.appendChild(t);
			});
		</script>
	</head>
	<body>
	${html.toString()}
	</body>
</html>
	`;
};
